<?php /* Smarty version 2.6.26, created on 2013-02-04 14:21:45
         compiled from tpattern_shop.html */ ?>
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
smarty_core_load_plugins(array('plugins' => array(array('function', 'html_options', 'tpattern_shop.html', 76, false),)), $this); ?>
<?php echo '<?xml'; ?>
 version="1.0" encoding="utf-8"<?php echo '?>'; ?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="ja" xml:lang="ja">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<meta http-equiv="Content-Script-Type" content="text/javascript" />
		<meta http-equiv="Content-Style-Type" content="text/css" />
		<title>コントロールパネル</title>
		<link rel="stylesheet" href="./assets/styles/default.css" type="text/css" />
		<link rel="stylesheet" href="./assets/styles/ui-lightness/ui.all.css" type="text/css" />
		<link rel="stylesheet" href="./assets/styles/ui-lightness/jquery-ui-1.7.3.custom.css" type="text/css" />
		<link rel="stylesheet" href="./assets/styles/dialog.css" type="text/css" />
	<style type="text/css">
		input.btnleft{	text-align:	left;};
 	</style>
		<script src="assets/scripts/jquery-1.7.1.min.js" type="text/javascript"></script>
		<script src="assets/scripts/jquery-ui-1.7.3.custom.min.js" type="text/javascript"></script>
		<script src="assets/scripts/ui/ui.dialog.js" type="text/javascript"></script>
		<script src="assets/scripts/menu.js" type="text/javascript"></script>
		<script src="assets/scripts/table.js" type="text/javascript"></script>
		<script type="text/javascript" src="./tinymce/jscripts/tiny_mce/tiny_mce.js"></script>
		<script type="text/javascript" src="./assets/scripts/editor.js"></script>
		<script type="text/javascript" src="./assets/scripts/ui/ui.datepicker.js"></script>
		<script type="text/javascript" src="./assets/scripts/ui/ui.core.js"></script>
		<script type="text/javascript">
			$(function() {
				$('#btn-export').click(function(){
					if (chkWeek()) {
						if(confirm('ダウンロードしますか？')){
							document.fm.csv.value="download";
							document.fm.submit();
						}
					}
				});
				$('#year4').change(function(){
					var year4 = this.value;
					var myDate = new Date();
					var nowtime =  myDate.getTime();
					$.get("mmap_week_ajax.php",{ y: year4,t : nowtime }, function(data){
						$("#matrix_cd").children().remove();
						$("#matrix_cd").append( data ); 
					});
				});	
			});
			function chkWeek() {
				var weekid = $("#matrix_cd").val() ;
				if (weekid.length == 0){
					alert("週を選択してください");
					return false;
				 }
				return true;
			}
		</script>
		<link rel="stylesheet" type="text/css" href="./assets/styles/tablesorter.css" />
		<script type="text/javascript" src="./assets/scripts/tablesorter.js"></script>
	</head>
	<body id="">
<?php echo $this->_tpl_vars['menu']; ?>

<?php echo $this->_tpl_vars['logout']; ?>

		<div id="container"><div class="wrapper">
			<h2>パターン管理</h2>
			<ul class="submenu clearfix">
				<?php if (! ( $this->_tpl_vars['isG6_7'] )): ?><li><a href="tpattern_index.php">店別配布明細検索．更新</a></li>
				<li><a href="tpattern_copy.php">店別配布明細登録</a></li><?php endif; ?>
				<li><a href="tpattern_export.php">店別配布明細出力</a></li>
				<li>店別パターン部数ＤＬ</li>
				 <li><a href="tpattern_delive.php">分納明細出力</a></li> 
			</ul>
			<h3>店別パターン部数</h3>
			<form name="fm" id="fm" method="get" action="tpattern_shop.php" >
<table class="formTable">
					<tbody>
					<tr><th>※年度.週</th><td>
<?php echo smarty_function_html_options(array('id' => 'year4','name' => 'year4','options' => $this->_tpl_vars['year4'],'selected' => $this->_tpl_vars['forms']['year4']), $this);?>
 年<?php echo $this->_tpl_vars['err']['year4']; ?>
&nbsp;&nbsp;&nbsp;
<?php echo smarty_function_html_options(array('id' => 'matrix_cd','name' => 'matrix_cd','options' => $this->_tpl_vars['week'],'selected' => $this->_tpl_vars['forms']['matrix_cd']), $this);?>

					</td></tr></table>
				<p class="button" style="text-align:center">
					<button type="button" id="btn-export" class="submit"><span>CSV出力</span></button>
				</p>
				<input type="hidden" name="search" value="1" />
				<input type="hidden" name="csv" />
			</form>

		</div></div>
		<?php echo $this->_tpl_vars['footer']; ?>

	</body>
</html>